﻿// License: https://opensource.org/licenses/MIT
// Create Date : 2018-01-01

using System;

namespace Cat.Core.XLog.LogToText
{
    /// <summary>
    /// 日志记录到StringBuilder的ILogProvider(主要用来做单元测试)
    /// </summary>
    public sealed class LogToTextProvider : LogProviderWithCache, ILogProvider
    {
        public static LogToTextProvider Instance { get; } = new LogToTextProvider();
        private LogToTextProvider() { }

        protected override ILogger CreateLoggerCore(String name)
        {
            return new TextLogger(name);
        }
        public void ClearLoggers()
        {
            Cache.Clear();
        }
    }
}
